/*
 * Copyright (C) 2005 - 2030 YGSoft.Inc All Rights Reserved.
 * YGSoft.Inc PROPRIETARY/CONFIDENTIAL.Use is subject to license terms.
 */

package com.example.demo.autoconfig;

import org.springframework.context.annotation.Import;
import java.lang.annotation.*;

/**
 * 启用自定义服务的注解.
 * 用于通过注解方式启用MyService自动配置功能.
 * 
 * @author dingdayong
 */
@Inherited
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Import(MyServiceAutoConfiguration.class)
//相当于使用定义spring.factories完成Bean的自动装配
public @interface EnableMyService {
//@Import(MyServiceAutoConfiguration.class) 需要在调用者的Main 类加上该注解就能等效于spring.factories 文件配置
}
